package com.example.controller;


import com.example.po.CensusAttendance;
import com.example.po.CensusCount;
import com.example.service.CensusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;
import java.util.List;

/***
 * 统计相关
 */
@Controller
public class CensusController {
    @Autowired
    private CensusService censusService;
    @RequestMapping("/getCensusCount")
    @ResponseBody
    public List<CensusCount> censusCount(HttpSession session){
        return censusService.cansusCount(session);
    }

    @RequestMapping("/getCensusAttendanceCount")
    @ResponseBody
    public List<CensusAttendance> getCensusAttendanceCount(HttpSession session){
        return censusService.cansusAttendanceCount(session);
    }
}
